package com.baizw.cultivation.module.admin.entity;

import com.baizw.cultivation.common.annotation.ExistInTable;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 字典类型表
 *
 * @author 剧终1204
 * @version V1.0
 * @date 2020年05月19日 15:47:04
 */
@Data
@ApiModel("字典类型表")
@TableName("sys_dict_type")
@EqualsAndHashCode(callSuper = true)
public class DictTypeEntity extends BaseEntity {

    /**
     * 字典名称
     */
    @NotBlank(message = "字典名称不能为空")
    @Size(max = 100, message = "字典类型名称长度不能超过100个字符")
    @ApiModelProperty(name = "字典名称")
    private String dictName;

    /**
     * 字典类型
     */
    @ExistInTable(tableName = "sys_dict_type", message = "字典类型已存在", mustExist = false)
    @NotBlank(message = "字典类型不能为空")
    @Size(max = 100, message = "字典类型类型长度不能超过100个字符")
    @ApiModelProperty(name = "字典类型")
    private String dictType;

}
